﻿
using System;

namespace OestsCommon.Model
{
    public class ExamModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public ExamType ExamType { get; set; }
        public int ProjectId { get; set; }
        public int PaperId { get; set; }
        public DateTime BeginTime { get; set; }

        public DateTime EndTime { get; set; }

        /// <summary>
        /// 考试时间
        /// </summary>
        public int Time { get; set; }
        /// <summary>
        /// 可交卷的时间
        /// </summary>
        public int HandinTime { get; set; }
        /// <summary>
        /// 通过分数
        /// </summary>
        public int PassGrade { get; set; }

        public bool IsOrder { get; set; }

        public string Describe { get; set; }

        public ExamState ExamState { get; set; }

        public int Count { get; set; }
        /// <summary>
        /// 若考试已完成，对应学生的成绩
        /// </summary>
        public int StudentGrade { get; set; }
        /// <summary>
        /// 创建教员
        /// </summary>
        public int TeacherId { get; set; }

        /// <summary>
        /// 查看答案方式：0：提交后可查看 1：倒计时结束后查看
        /// </summary>
        public int CheckAnswer { get; set; }

        public ExamModel() { }
    }

    public enum ExamState
    {
        /// <summary>
        /// 草稿
        /// </summary>
        Draft,
        /// <summary>
        /// 未进行
        /// </summary>
        Unprocess,
        /// <summary>
        /// 进行中
        /// </summary>
        Processing,
        /// <summary>
        /// 已结束
        /// </summary>
        Done
    }

    public enum ExamType
    {
        Thoery,
        Operate
    }
}
